<template>
    <div class="wrap">
        <Header :title="'我要评论'"/>
        <form action="">
            <textarea v-model="comment" placeholder="请输入要评论的内容..."></textarea>
            <mt-button type="primary" size="large" @click="publish">发表评论</mt-button>
        </form>

    </div>
</template>
<script>
import Header from '../comments/header.vue'
import Bus from '../eventBus.js'
export default {
    data(e){
        console.log(e.$route.params.id)
        return{
            id:e.$route.params.id,
            comment:''
        }
    },
    methods:{
        publish(id){
            this.$router.push('/steward/steward-detail/' + id)
            var comment = this.comment;
            Bus.$emit('func',comment)
        }
    },
    components:{
        "Header":Header
    }
}
</script>
<style scoped>
.wrap{
    height: 100%;
}
.wrap form{
    padding: 10px;
}
.wrap form textarea{
    height: 100px;
}
</style>


